var mongoose = require('mongoose');

var Schema = mongoose.Schema;

var schema = new Schema({
  notebook: String,
  userid: String,
  created_at:Date,
  content: String,
  location: String,
  weather: String,
  mood: String,
  privacy: Number,
  forbid: Number,
  assist: Array,
  commentcount: Number,
  view: Number,
  id: Number,
});

schema.index({id:1},{unique:true});
schema.set('collection','diary');

module.exports = mongoose.model('diary',schema);
